/*
 * @Author: 260156 260156@gree.com.cn
 * @Date: 2022-08-08 11:35:57
 * @LastEditors: 260156 260156@gree.com.cn
 * @LastEditTime: 2022-09-16 11:21:27
 * @FilePath: \gree-zst-web\types\request.ts
 * @Description:
 *
 * Copyright (c) 2022 by 260156 260156@gree.com.cn, All Rights Reserved.
 */

// 数据请求
export interface BasicFetchResult<T = any> {
  data: T;
  desc: string;
  status: number;
  success: boolean;
}

export interface DataListWithPage<T = any> {
  items: T[];
  pageTotal: number;
  totalNum: number;
}

export interface DataListWithPage2<T = any> {
  list: T[];
  total: number;
  pageNum: number;
}

export interface DataListWithoutPage<T = any> {
  lut: string;
  resultList: T[];
}

// 导出
export type DownloadResult = string;

export interface DownloadRequestOptions {
  fileName?: string;
  ext?: string;
}

export interface DownloadRequestResult {
  status: 200 | 500;
  message: string | unknown;
}
